package com.book.lizhi.http;

import com.book.lizhi.AppConfig;
import com.book.lizhi.util.AppLog;

public class HttpUtil {
	public static String getBookListURL(String page) {
		String url = AppConfig.HOST + "/lizhishu/" + page + ".json";
		return url;
	}

	public static String getArticleListURL(String page, String type) {
		String url = AppConfig.ENCOURAGE_HOST + "/types/" + type + "/" + page + ".json";
		return url;
	}

	public static String getArticleContentURL(String type, String id) {
		String url = AppConfig.ARTICLE_CONTENT_HOST + type + "/" + id + ".json";
		return url;
	}

	public static String formateUrl(String host, String startTime, String endTime) {
		StringBuffer buffer = new StringBuffer(host);
		buffer.append("?orderBy=%22time%22&startAt=%22" + startTime + "%22&endAt=%22" + endTime + "%22&limitToLast=5&print=pretty");
		AppLog.e(buffer.toString());
		return buffer.toString();
	}

}
